<template>
	aaaComponent
  <input ref="fileRef" type="file" multiple name="" value="" @change="change">

</template>

<script setup lang="ts">
import { ref, onMounted, onActivated, onDeactivated, getCurrentInstance } from "vue";

let fileRef = ref(null) as any
function change () {
  console.log( fileRef.value.files );
  let files = fileRef.value.files
  let formData: any = new FormData();
  for (let i = 0; i < files.length; i++) {
    let file = files[i];
    formData.append('files', file);
  }
  // console.log( formData.values() );

  for (let [a, b] of formData.entries()) {
    console.log(a, ":", b);
  }
}

onMounted(() => {
  console.log('aaaComponent onMounted');
})

onActivated(() => {
  console.log('aaaComponent onActivated');
})

onDeactivated(() => {
  console.log( 'aaaComponent onDeactivated' );
})
</script>

<style lang="scss" scoped>

</style>